home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / pyshared / whisperBack / exceptions.py < prev    next >
Encoding:
Python Source  |  2012-12-13  |  1.7 KB  |  50 lines

  1. #!/usr/bin/env python
  2. # -*- coding: UTF-8 -*-
  3.  
  4. ########################################################################
  5. # WhisperBack - Send feedback in an encrypted mail
  6. # Copyright (C) 2009-2012 Tails developers <amnesia.org>
  7. #
  8. # This file is part of WhisperBack
  9. #
  10. # WhisperBack is  free software; you can redistribute  it and/or modify
  11. # it under the  terms of the GNU General Public  License as published by
  12. # the Free Software Foundation; either  version 3 of the License, or (at
  13. # your option) any later version.
  14. # This program  is distributed in the  hope that it will  be useful, but
  15. # WITHOUT   ANY  WARRANTY;   without  even   the  implied   warranty  of
  16. # MERCHANTABILITY  or FITNESS  FOR A  PARTICULAR PURPOSE.   See  the GNU
  17. # General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU General Public License
  20. # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  21. ########################################################################
  22.  
  23. """Base exceptions for whisperback
  24.  
  25. """
  26.  
  27. class WhisperbackException(Exception):
  28.     """Base class for all exceptions raised by WhisperBack"""
  29.     pass
  30.  
  31. # Used in whisperback.py
  32.  
  33. class MisconfigurationException(WhisperbackException):
  34.     """This exception is raised when the configuartion can't be properly
  35.     loaded
  36.  
  37.     """
  38.     def __init__(self, variable):
  39.         WhisperbackException.__init__(self,
  40.             _("The variable %s was not found in any of the configuation files"
  41.             "/etc/whisperback/config.py, ~/.whisperback/config.py, ./config.py")
  42.             % variable)
  43.  
  44. # Used in encryption.py
  45.  
  46. class EncryptionException (WhisperbackException):
  47.     """This exception is raised when GnuPG fails to encrypt the data"""
  48.     pass
  49.